<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:jsf="http://xmlns.jcp.org/jsf"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:p="http://primefaces.org/ui">


    <div class="login-logo">
        <img src="#{request.contextPath}/resources/images/logo_cjava_1.png" width="150" height="80" /> 
    </div>

    <div class="widget">
        <div class="login-content">
            <div class="widget-content" style="padding-bottom:0;">
                <h:form class="no-margin" >
                    <h3 class="form-title">Sociedad CJava #{clientBean.yearAssociate}</h3>

                    <fieldset>
                        <div class="form-group no-margin">
                            <label for="email">Usuario</label>
                            <div class="input-group input-group-lg">
                                <span class="input-group-addon">
                                    <i class="icon-user"></i>
                                </span>
                                <p:inputText placeholder="Usuario" required="true"
                                             value="#{clientBean.userName}"
                                             requiredMessage="Falta Usuario"
                                             styleClass="form-control input-lg" id="email" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="password">Password</label>

                            <div class="input-group input-group-lg">
                                <span class="input-group-addon">
                                    <i class="icon-lock"></i>
                                </span>
                                <p:password placeholder="Password" required="true"
                                            value="#{clientBean.password}"
                                            requiredMessage="Falta Password"
                                            styleClass="form-control input-lg" id="password" />
                            </div>

                        </div>
                    </fieldset>
                    <div class="form-actions">
                        <label class="checkbox">
                            <div class="checker">
                                <span>
                                    <p:commandLink value="●Pre Inscripción Sociedad"
                                                   style="color:#3399FF;"
                                                   action="#{clientBean.initResetPassword()}"
                                                   process="@this"
                                                   ajax="false"
                                                   update=":globalContent">
                                        <f:setPropertyActionListener
                                            target="#{navigatorClientBean.navigationContent}"
                                            value="./pages/client/register_person.xhtml" />
                                    </p:commandLink>
                                </span>
                            </div> 
                        </label>
                        <p:commandButton action="#{clientBean.loginClient()}"
                                         styleClass="btn btn-warning pull-right" value="Login">
                        </p:commandButton> 

                    </div>
                </h:form>
                <h:form>
                    <div class="forgot">
                        <p:commandLink styleClass="forgot" 
                                       process="@none"
                                       ajax="false"
                                       update=":globalContent"
                                       action="#{clientBean.initResetPassword()}"
                                       value="Olvido su usuario o contraseña?" >
                            <f:setPropertyActionListener
                                target="#{navigatorClientBean.navigationContent}"
                                value="./pages/client/reload_password.xhtml" />
                        </p:commandLink>

                    </div> 
                </h:form>
            </div>
        </div>
    </div>
</ui:composition>

